package com.weipai.springboot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
//扫描mybatis的dao接口
@MapperScan(basePackages = {"com.weipai.springboot.module.mapper"})
//开启定时任务,暂不需要
@EnableScheduling
//扫描注解目录
@ComponentScan("com.weipai")
@ImportResource(locations = {"classpath:spring/*.xml"})
@EnableTransactionManagement//启注解事务管理，等同于xml配置方式的 <tx:annotation-driven />
//@ServletComponentScan  //它的作用主要是加载@WebServlet，并将被@WebServlet修饰的类实例化
public class GongLaoDaApplication  {

	public static void main(String[] args) {
		SpringApplication.run(GongLaoDaApplication.class, args);
	}


}
